home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / pa32v315.zip / TEST40.CLS < prev    next >
Text File  |  1996-11-26  |  1KB  |  81 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "TestClass"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = True
  8. Option Explicit
  9.  
  10. Dim v As Long
  11. Dim s As Byte
  12.  
  13. Const sNormal = 0, sAbnormal = 1
  14.  
  15.  
  16. Private Sub Class_Initialize()
  17.  
  18. MsgBox "Object initialization OK"
  19. Style = sNormal
  20.  
  21. End Sub
  22.  
  23.  
  24. Private Sub Class_Terminate()
  25.  
  26. If Style = sAbnormal Then
  27.    Beep
  28.    testform.Blink
  29. End If
  30. MsgBox "Object will be destroyed. Property Value was " & Value()
  31.  
  32. End Sub
  33.  
  34.  
  35.  
  36. Public Property Get Value()
  37.  
  38. Value = v
  39.  
  40. End Property
  41.  
  42. Public Property Let Value(vNewValue)
  43.  
  44. v = vNewValue
  45.  
  46. End Property
  47.  
  48. Public Sub showpublichello()
  49.  
  50. Dim showpublichello As Integer
  51. Dim showprivatehello As Integer
  52.  
  53. MsgBox "Hello, world! My Value is " & Value
  54. Style = sAbnormal
  55.  
  56. End Sub
  57.  
  58. Private Sub showprivatehello(ThisIsAByRefParameter, Optional ByVal ThisIsAByValParameter)
  59.  
  60. MsgBox "Hello fellow!"
  61.  
  62. ThisIsAByRefParameter = "This isn't dead"
  63. ThisIsAByValParameter = "This is dead"
  64.  
  65. End Sub
  66.  
  67. Private Property Get Style()
  68.  
  69. Style = s
  70.  
  71. End Property
  72.  
  73. Private Property Let Style(vNewValue)
  74.  
  75. s = vNewValue
  76.  
  77. End Property
  78.  
  79.  
  80.  
  81.